/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.jomijushi.fid.dominio;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author miguel
 */
@Embeddable
public class FidPedidoCompraComprobanteCompraPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "fid_pedido_compra_id")
    private int fidPedidoCompraId;
    @Basic(optional = false)
    @Column(name = "fid_comprobante_compra_id")
    private int fidComprobanteCompraId;

    public FidPedidoCompraComprobanteCompraPK() {
    }

    public FidPedidoCompraComprobanteCompraPK(int fidPedidoCompraId, int fidComprobanteCompraId) {
        this.fidPedidoCompraId = fidPedidoCompraId;
        this.fidComprobanteCompraId = fidComprobanteCompraId;
    }

    public int getFidPedidoCompraId() {
        return fidPedidoCompraId;
    }

    public void setFidPedidoCompraId(int fidPedidoCompraId) {
        this.fidPedidoCompraId = fidPedidoCompraId;
    }

    public int getFidComprobanteCompraId() {
        return fidComprobanteCompraId;
    }

    public void setFidComprobanteCompraId(int fidComprobanteCompraId) {
        this.fidComprobanteCompraId = fidComprobanteCompraId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) fidPedidoCompraId;
        hash += (int) fidComprobanteCompraId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FidPedidoCompraComprobanteCompraPK)) {
            return false;
        }
        FidPedidoCompraComprobanteCompraPK other = (FidPedidoCompraComprobanteCompraPK) object;
        if (this.fidPedidoCompraId != other.fidPedidoCompraId) {
            return false;
        }
        if (this.fidComprobanteCompraId != other.fidComprobanteCompraId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jomijushi.fid.dominio.FidPedidoCompraComprobanteCompraPK[fidPedidoCompraId=" + fidPedidoCompraId + ", fidComprobanteCompraId=" + fidComprobanteCompraId + "]";
    }

}
